package com.dwxt.cdms.controller;

import com.dwxt.cdms.base.Page;
import com.dwxt.cdms.entity.Birthday;
import com.dwxt.cdms.service.BirthdayService;
import com.dwxt.common.base.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/cdms/birthday")
@RestController
public class BirthdayController {

    @Autowired
    private BirthdayService birthdayService;

    /**
     * 客户生日分页
     * @param page
     * @param birthday
     * @return
     */
    @RequestMapping("/page")
    public BaseResult page(Page page, Birthday birthday){
        return birthdayService.page(page,birthday);
    }

    /**
     *标记已通知客户生日
     * @param id
     * @return
     */
    @RequestMapping("/handle")
    public BaseResult handle(Integer id){
        return birthdayService.handle(id);
    }

}
